//
//  PormptAction.m
//  CarService
//
//  Created by Nimo.Yu on 15/1/30.
//  Copyright (c) 2015年 lexingsoft. All rights reserved.
//
@import  UIKit;
#import "PromptAction.h"

@implementation PromptAction

+ (void) showPromptAlter:(NSString *) message
{
    dispatch_async(dispatch_get_main_queue(), ^{
        UIAlertView *alterView = [[UIAlertView alloc] initWithTitle:message message:nil delegate:nil cancelButtonTitle:@"确定" otherButtonTitles: nil];
        [alterView show];
    });
}

+ (void)showInfoPrompt:(NSString *)message{
    dispatch_async(dispatch_get_main_queue(), ^{
        [SVProgressHUD showInfoWithStatus:message];
    });
}

+ (void) showSuccessPrompt:(NSString *) message
{
    dispatch_async(dispatch_get_main_queue(), ^{
        [SVProgressHUD showSuccessWithStatus:message];
    });
}

+ (void) showErrorPrompt:(NSString *) message
{
    dispatch_async(dispatch_get_main_queue(), ^{
        [SVProgressHUD showErrorWithStatus:message];
    });
}

+ (void) showWaitPrompt:(NSString *) message
{
    dispatch_async(dispatch_get_main_queue(), ^{
        [SVProgressHUD showWithStatus:message];
    });
}

+ (void) dismissPrompt
{
    dispatch_async(dispatch_get_main_queue(), ^{
        [SVProgressHUD dismiss];
    });
}

+ (void) showProgress:(float) progress
{
    dispatch_async(dispatch_get_main_queue(), ^{
        [SVProgressHUD showProgress:progress];
    });
}

@end
